**# Bookmark #1 Setting

*Windows
global root  = "G:/Dropbox/Environmental Injustice/Empirical"
global rawdata = "$root/rawdata"
global workdata = "$root/workdata"
global results = "$root/results"
global outfile = "$root/outfile"

cd "$workdata"


**# Bookmark #2 Table S2 Panel A: Baseline Results
use "$outfile/Table S2 Panel A.dta",clear

replace city_target=-city_target

reghdfe codemission c.city_target##i.post,absorb(i.id i.year) cluster(i.province i.year)
outreg2 using "$results/Table S2 PanelA.xls",replace ctitle("Firm-level COD Emission") ///
keep(1.post#c.city_target) ///
addtext(Firm FE, YES, Year FE, YES, RegionbyYear FE, NO, ProvincebyYear FE, NO) ///
bdec(3) tdec(3) rdec(3)

reghdfe codemission c.city_target##i.post,absorb(i.id i.region#i.year) cluster(i.province i.year)
outreg2 using "$results/Table S2 PanelA.xls",append ctitle("Firm-level COD Emission") ///
keep(1.post#c.city_target) ///
addtext(Firm FE, YES, Year FE, NO, RegionbyYear FE, YES, ProvincebyYear FE, NO) ///
bdec(3) tdec(3) rdec(3)

reghdfe codemission c.city_target##i.post,absorb(i.id i.province#i.year) cluster(i.province i.year)
outreg2 using "$results/Table S2 PanelA.xls",append ctitle("Firm-level COD Emission") ///
keep(1.post#c.city_target) ///
addtext(Firm FE, YES, Year FE, NO, RegionbyYear FE, NO, ProvincebyYear FE, YES) ///
bdec(3) tdec(3) rdec(3)


**# Bookmark #3 Table S2 Panel B: Industry FE
use "$outfile/Table S2 Panel B.dta",clear

replace city_target=-city_target

reghdfe codemission c.city_target##i.post,absorb(i.id i.ind#i.year) cluster(i.province i.year)
outreg2 using "$results/Table S2 PanelB.xls",replace ctitle("Firm-level COD Emission") ///
keep(1.post#c.city_target) ///
addtext(Firm FE, YES, RegionbyYear FE, NO, ProvincebyYear FE, NO, IndustrybyYear YES) ///
bdec(3) tdec(3) rdec(3)

reghdfe codemission c.city_target##i.post,absorb(i.id i.region#i.year i.ind#i.year) cluster(i.province i.year)
outreg2 using "$results/Table S2 PanelB.xls",append ctitle("Firm-level COD Emission") ///
keep(1.post#c.city_target) ///
addtext(Firm FE, YES, RegionbyYear FE, YES, ProvincebyYear FE, NO, IndustrybyYear YES) ///
bdec(3) tdec(3) rdec(3)

reghdfe codemission c.city_target##i.post,absorb(i.id i.province#i.year i.ind#i.year) cluster(i.province i.year)
outreg2 using "$results/Table S2 PanelB.xls",append ctitle("Firm-level COD Emission") ///
keep(1.post#c.city_target) ///
addtext(Firm FE, YES, RegionbyYear FE, NO, ProvincebyYear FE, YES, IndustrybyYear YES) ///
bdec(3) tdec(3) rdec(3)
